<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="br.com.trabalho.util.Util"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="js/funcoes.js"></script>   
        <title>Realizar Login</title>
    </head>
    <body>
        <div style="text-align: center;">
            <h1>Site de Receitas</h1>
            <div id="mensagens" style="color:red;"></div>
            <form action="index" method="POST" onsubmit="return validaLogin(this)">
                <label for="login">Email:</label><input name="login"/><br/>
                <label for="senha">Senha:</label><input name="senha" type="password"/><br/>
                <button type="submit">Enviar</button>
            </form>
            <a href="cadastro">Cadastrar-se</a><br/>
            <a href="index.jsp">voltar</a>
        </div>
    </body>
    <c:if test="${param.login != null}">
        <script>
            var loginFail = ${param.login};
            if(loginFail == false)
                alert("Usuario ou Senha Incorretos");

        </script>            
    </c:if>
</html>
